package base.sort.tree;

public class TreeNode {

    private int index;
    private String data;
    public TreeNode leftChild;
    public TreeNode rightChild;


    public TreeNode(int index, String data) {
        this.index = index;
        this.data = data;
        this.leftChild = null;
        this.rightChild = null;
    }


    public int getIndex() {
        return index;
    }


    public void setIndex(int index) {
        this.index = index;
    }


    public String getData() {
        return data;
    }


    public void setData(String data) {
        this.data = data;
    }

    public TreeNode getLeftChild() {
        return leftChild;
    }

    public void setLeftChild(TreeNode leftChild) {
        this.leftChild = leftChild;
    }

    public TreeNode getRightChild() {
        return rightChild;
    }

    public void setRightChild(TreeNode rightChild) {
        this.rightChild = rightChild;
    }


}
